<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>  </title>
    <style>
        .box1{
            width: 300px;
            height: 300px;
            background-color: red;
            position: fixed;/*只是左上角点在正中间*/
           left: 50%;
           top: 40%;
           /* margin-top: -150px;
           margin-left: -150px; */
           transform: translate(-150px,-150px);
        }
        /* .box1:hover{
             transform: translate(50px,50px);
        } */

        .box2{
            width: 300px;
            height: 300px;
            background-color: blue;
        }

        .box2:hover{
            /* transform: scale(0.5);*/
            /* transform: rotate(30deg); */
            transform:skewX(-30deg);
        } 
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <!-- <h1>nihao</h1> -->
</body>
</html>